import './assets/main.css'
import 'animate.css'
// 导入 element-plus 暗黑 css
import 'element-plus/theme-chalk/dark/css-vars.css'
// 导入 Element Plus 图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import { createApp } from 'vue'
import App from '@/App.vue'
//导入路由
import router from '@/router'
// 导入全局路由守卫
import '@/permission'
//引入加载条样式
import 'nprogress/nprogress.css'
//导入pinia
import pinia from '@/stores/index'
// 图片点击放大
import 'viewerjs/dist/viewer.css'
import VueViewer from 'v-viewer'
// 导入mathjax
import mathJax from '../public/mathjax-config/mathjax-config'
// import 'mathjax/es5/tex-mml-chtml'
import hljsVuePlugin from '@highlightjs/vue-plugin'
const app = createApp(App)
//应用路由
app.use(router)

//应用pinia
app.use(pinia)
app.use(VueViewer)
app.config.globalProperties.mathJax = mathJax
app.use(hljsVuePlugin)
app.mount('#app')
// 引入图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}